/**
 * @file   main.cpp
 * @author HirasawaYui <yui@Ubuntu18-04>
 * @date   Mon Oct 26 14:11:59 2020
 * 
 * @brief  test file
 * 
 * 
 */

#include "FEMSpace.h"
#include "MultigridSolver.h"

double f(double x, double y)
{
    return 2*PI*PI*cos(PI*x)*cos(PI*y);
}
double u(double x, double y)
{
    return cos(PI*x)*cos(PI*y);
}

int main(int argc, char* argv[])
{
    //FEMSpace FE(3, f,u);
    //FE.GenerateA();
   // FE.GenerateRhs();
    //FE.DealBoundary();
    //FE.PrintA();
    //FE.PrintRhs();
    //MultigridSolver Solver(4,f,u);
    //Solver.Solve();
    FEMSpace FE(3, f,u);
    FE.GenerateA();
    //FE.GenerateRhs();
    std::cout << " --------- " <<std::endl;
    FE.PrintA();
    FEMSpace FE2(5, f,u);
    FE2.GenerateA();
    //FE2.GenerateRhs();
    FE2.PrintA();

    MultigridSolver Solver(3,f,u);
    Solver.Solve();
    return 0;
}
